﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MessageCallAspect.Inspector.Aspect.Cache
{
    public class CacheObject
    {
        public DateTime Timestamp { get; private set; }
        public object Value { get; private set; }

        public CacheObject(DateTime timestamp, object value)
        {
            Timestamp = timestamp;
            Value = value;
        }

        public bool IsExpired(TimeSpan timeout)
        {
            return (DateTime.Now - Timestamp) > timeout;
        }

    }
    
}
